Improve explicit drawing and flushing (fixes GtkRuler)
authorRichard Hult <richard@imendio.com>
Wed, 18 Feb 2009 15:20:06 +0000 (16:20 +0100)
committerAlexander Larsson <alex@localhost.localdomain>
Thu, 2 Apr 2009 08:16:30 +0000 (10:16 +0200)
commit255756cfc8d1e53e454f66814d37b328df53c127
tree4eeadb5eae72d4e9b4411b0f9a060985424a91be
parent255ec543b191743bd87a11a805ed06cf259921cd
Improve explicit drawing and flushing (fixes GtkRuler)

Use the same code path to get a CGContext for both gdk_draw_* and
gdk_cairo_create and make sure we unlockFocus in both cases. This
fixes the broken rendering in GtkRuler. Also use an average of flush
intervals when checking whether we can flush or not, since otherwise
we get too sensitive and block almost all explicit flushes that are
caused by mouse movements for example.
gdk/quartz/gdkdrawable-quartz.c
gdk/quartz/gdkprivate-quartz.h
gdk/quartz/gdkwindow-quartz.c